#!/usr/bin/python
# coding:utf-8

class Stack:
	def __init__(self):
		self.items = []

	def isEmpty(self):
		return self.items == []

	def push(self, item):
		self.items.append(item)

	def pop(self):
		return self.items.pop()

	def peek(self):
		return self.items[-1]

	def size(self):
		return len(self.items)

if __name__ == "__main__":
	s = Stack()
	s.isEmpty()
	s.push(123)
	s.push(321)
	s.push(s.peek())
	print s.items
	s.pop()
	print s.items
	print s.size()

# 简单括号匹配

# 简单符号匹配

# 十进制转二进制

# 中缀前缀和后缀表达式



